package lesson01;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;

public class Demo_106 {


    public static void main(String[] args) {
        File file = new File("d:/temp");

        String[] arrList = file.list();
        System.out.println("数组存储的路径："+Arrays.toString(arrList));

        File[] fileList = file.listFiles();
        System.out.println("目录存储的路径："+Arrays.toString(fileList));
    }




















    /*public static void main(String[] args) throws IOException {
        File file = new File("d:/temp");
        String[] list = file.list();
        System.out.println("文件名和目录名String: " + Arrays.toString(list));
        File[] listFiles = file.listFiles();
        System.out.println("文件名和目录名File" + Arrays.toString(listFiles));
    }*/
}
